#include "ReusableRotorDef.h"

ReusableRotorDef::ReusableRotorDef(
	bool collide,
	bool enableLimit, float leftLimit, float rightLimit,
	bool enableMotor, float motorForce, float motorSpeed )
{
	m_jointDef = new b2RevoluteJointDef();
	m_jointDef->collideConnected = collide;
	m_jointDef->enableLimit = enableLimit;
	m_jointDef->lowerAngle = rightLimit;
	m_jointDef->upperAngle = leftLimit;

	m_jointDef->enableMotor = enableMotor;
	m_jointDef->motorSpeed = motorSpeed;
	m_jointDef->maxMotorTorque = motorForce;
}

ReusableRotorDef::~ReusableRotorDef() {
	delete m_jointDef;
}
